package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;

/**
 * 用户实体类
 */
public class UserBean {
    /**编号*/
  private int id;
  /**用户名*/
  private String name;
  /**密码*/
  private String pwd;
  /**邮件*/
  private String email;
  /**头像*/
  private String img;
  /**注册时间*/
  @JsonFormat(pattern = "yyyy-MM-dd")
  private LocalDate inDate = LocalDate.now();

    public UserBean() {
    }

    public UserBean(String name, String pwd, String email, String img) {
        this.name = name;
        this.pwd = pwd;
        this.email = email;
        this.img = img;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public LocalDate getInDate() {
        return inDate;
    }

    public void setInDate(LocalDate inDate) {
        this.inDate = inDate;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", email='" + email + '\'' +
                ", img='" + img + '\'' +
                ", inDate=" + inDate +
                "}\n";
    }
}
